(function () {
    Array.prototype.removeItem = function (item) {
        for (var i = 0; i < this.length; i++) {
            if (this[i] === item) {
                this[i] = this[this.length - 1];
                this.pop();
                i--;
            }
        }

        return this;
    };

    var arr = [1, 2, 1, 4, 1, 3, 4, 1, 111, 3, 2, 1, '1'];
    arr.removeItem(1);
    console.log(arr);
}());